package me.zxk.qwert_poetry.dao;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import lombok.Data;

import java.io.Serializable;

@Data
class CompositeKey implements Serializable {
    private Integer userId;
    private Integer poemId;
}

@Data
@Entity
@IdClass(CompositeKey.class)
public class UserLikePoem {
    @Id
    @Column(name = "user_id")
    private Integer userId;
    @Id
    @Column(name = "poem_id")
    private Integer poemId;
}
